package list_map;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2020-11-07 20:39
 **/
public class collections {
    public static void main(String[] args) {
        List list=new ArrayList();
//        list.add(12);
//        list.add(13);
//        list.add(10);
//        list.add(10);
//        list.add(8);
        list.add("lll");
        list.add("kkk");
        list.add("kkk");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
        int binarySearch = Collections.binarySearch(list, "lll");
        System.out.println(binarySearch);
        System.out.println(Collections.frequency(list, "kkk"));
    }
}
